package UIFree.behavior
{
	import UIFree.FXContainer;
	import UIFree.FXEvent;
	import UIFree.FX;
	
	import flash.display.DisplayObject;

	public class bh_stateBehavior extends uif_baseBehavior {
		protected var _fx: FX;
		public function bh_stateBehavior(a_component:DisplayObject, a_options:Object) {
			super(a_component, a_options);
		}

		public function set state(a_state: Number): void {
			updateState(a_state);
		}
		
		override protected function run(afterEnd: Function): void {
			_fx = new FXContainer(this, 'state', -1, 1, function(e: FXEvent): void {
				afterEnd();
			}, options.transition, 50, options.duration).start();
		}
		
		override public function cancel(): void {
			_fx.cancel();
			super.cancel();
		}
		
		protected function updateState(a_state: Number): void {
			
		} 
	}
}